#游标的高级用法
# 建立数据库连接
import pymysql

conn = pymysql.connect(
    host='192.168.248.135',
    user='root',
    password='@0713NBwq',  # 实际密码，若为空需修改
    database='web',
    charset='utf8mb4',
    port=3306,
    cursorclass=pymysql.cursors.DictCursor
)

cursor = conn.cursor()

